<!DOCTYPE html>
<!-- saved from url=(0079)https://m.zuche.com/html5/newversion/rent/rent_map.html?fr=send&v=1542354450419 -->
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="/css/H5phone/地图取点_files/style1536672475627.css">
		<title>地图取点</title>
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="no-cache">
		<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
		<meta http-equiv="Expires" content="0">
		<style type="text/css">
			body,
			html {
				width: 100%;
				height: 100%;
				margin: 0;
				font-family: "微软雅黑";
			}
			
			#l-map {
				height: 300px;
				width: 100%;
			}
			
			#r-result {
				width: 100%;
			}
		</style>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=A0yyE9id6tCFW5Q7ObbUKwYQ5kMsUWtj"></script>
		<link type="text/css" rel="stylesheet" href="/css/H5phone/地图取点_files/common@ee713f7a54.css">
	</head>
<#if zctype?? && tc??>
	<body style="background-color: #ffffff;" class="" zctype=${zctype} tc="${tc}">
	<#else>
	<body style="background-color: #ffffff;" class="" >
</#if>
		<header>
		
			<div class="maprightqx">取消</div>
			<#if smtype??>
			<#if smtype=="1">
			<h1 class="header_title" id="header_title" city="${place}">送车地点</h1>
			<#else>
			<h1 class="header_title" id="header_title" city="${place}+'神州租车'">送车地点</h1>
			</#if>
			</#if>
			<div class="mapleftqd">确认</div>
		</header>
		<#if ccct??>
	<span style="display: none" class="ccct">
	${ccct}
	</span>
	</#if>
	
	<#if pageIndex??>
	<span style="display: none" class="pageIndex">
	${pageIndex}
	</span>
	</#if>
		
		<#if id??>
			<span class="ids" style="display: none">${id}</span>
		</#if>
		<#if money??>
			<span class="money" style="display: none">${money}</span>
		</#if>
		<div class="mapsearch">
			<h2>
    	<form id="mapreset">
    	<#if hccity??>
    	<div class="hccity" style="display:none">${hccity}</div>
    	</#if>
    	<#if qccity??>
    	<div class="qccity" style="display:none">${qccity}</div>
    	</#if>
    
    	<#if (place)??>
        <span><b id="city">${place}</b><img src="/css/H5phone/地图取点_files/arrow-left.jpg"></span>
        </#if>
        <input class="btn-text" type="text" value="送车上门地址">
        <em class="resetem" onclick=""><img src="/css/H5phone/地图取点_files/inputreset.png" width="15" height="15"></em>
        </form>
        <div class="yellcancel" onclick="">取消</div>
    </h2>
		</div>
		<#if pan ??>
		<span class="pans" style="display: none">${pan}</span>
		</#if>
		
		<div class="newmapditu">
			<div style="width: 100%; height: 100%; position: relative; background: rgb(252, 249, 242);" id="map_div" class="amap-container"><object style="display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;" type="text/html" data="/css/H5phone/地图取点_files/saved_resource.html"></object>
				<div id="l-map"></div>
			</div>
		</div>
		<div id="r-result">

		</div>
		</div>

	

		<div id="loading-mask" class="mask" style="display: none;">
			<div class="loading-new"><span class="l-logo"></span><span class="l-film animate-loading"></span></div>
		</div>
		<script type="text/javascript" src="/js/jquery-3.2.1.js"></script>
		<script type="text/javascript">
			var place = $("#header_title").attr("city");
			// 百度地图API功能
			var map = new BMap.Map("l-map"); // 创建Map实例
			map.centerAndZoom("<h1>添加数据</h1>")
			map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
			var local = new BMap.LocalSearch(map, {
				renderOptions: {
					map: map,
					panel: "r-result"
				}
			});
			console.log(local);
			local.search(place);

			$("#r-result").find("li").click(function() {
				alert(1);
			})

			$(".btn-text").click(function() {
				$(".btn-text").val("");
			})
			$(".btn-text").on('input', function(e) {
				local.search($(".btn-text").val());
			});
			$(".mapleftqd").click(function(){
				//顺风车过来的判断 如果是1 就调回顺风车  没做。
				var pans = $(".pans").text().trim();
				
				var city="";
				var placeDetail="";
				var a=$("#r-result").find("ol").children("li");
				a.each(function(){
					var color=$(this).find("div").eq(0).css("background-color");
					if(color=="rgb(240, 240, 240)"){
						city=$(this).find("div").eq(0).children().eq(0).children().eq(0).text();
						placeDetail=$(this).find("div").eq(0).children().eq(1).children().eq(1).text();
						console.log(city);
					}
				})
				var zctype=$("body").attr("zctype");
				if(pans=="1"){
					var hccity = city.substr(city.indexOf("(")+1);
					
					hccity = hccity.replace(")","");
					var ids = $(".ids").text().trim();
					var money = $(".money").text().trim();
					var ccct = $(".ccct").text().trim();
		        	var pageIndex = $(".pageIndex").text().trim();
					window.location.href="/shun/orderInfos?hccity="+hccity+"&id="+ids+"&money="+money+"&city="+ccct+"&pageIndex="+pageIndex;
					return false;
				}
				if(zctype=="1"){
					var hccity=$(".hccity").html();
					var tc=$("body").attr("tc");
					window.location.href="/jump/daodianquhuan?qccity="+city+"&zctype="+"1"+"&hccity="+hccity+"&hccityDetail="+placeDetail+"&tc="+tc;
				}
				else{
					var qccity=$(".qccity").html();
					var tc=$("body").attr("tc");
					window.location.href="/jump/daodianquhuan?hccity="+city+"&zctype="+"2"+"&qccity="+qccity+"&qccityDetail="+placeDetail+"&tc="+tc;
				}
				
			})
			$(".maprightqx").click(function(){
			window.history.back(-1);
		})
		</script>
	</body>

</html>